<?php
class EmployeeAction extends AppAction{
    public function _initialize(){
        $this->model=new App_memberModel();
    }
    //获取全部联系人  100
    public function index(){
        if($_POST['requestType']=='100'){
            $map['m.site_id']=__SITEID__;
            $data=$this->model->member($map,'0');
            $this->callback($data);
        }
    }
    //获取单个联系人  101
    public function getinfo(){
        if($_POST['requestType']=='101'){
            if($_POST['requestId']&&$_POST['userId']&&$_POST['deviceId']){
                if($this->belong($_POST['requestId'],$_POST['userId'])){
                    $map['m.site_id']=__SITEID__;
                    $map['m.id']=$_POST['requestId'];
                    $data=$this->model->member($map,'1');
                    $this->callback($data);
                }
            }
        }
    }
}